import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import bookPage from '../views/bookPage.vue'
import ingPage from '../views/movie/more/ingPage.vue'
import detailPage from '../views/movie/more/innerPage/detailPage.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/book',
    name: 'book',
    component: bookPage
  },
  {
    path: '/more',
    name: 'more',
    component: ingPage,
    children: [
      {
        path: '/detail',
        name: 'detail',
        component: detailPage
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
